# Contributor: Andrew Domaszek <brimston3@hg0.us>
# Maintainer:
pkgname=ebook-tools
pkgver=0.2.2
pkgrel=1
pkgdesc="Tools for accessing and converting various ebook file formats."
url="https://sourceforge.net/projects/ebook-tools/"
arch="all"
license="MIT"
depends=""
depends_dev="cmake libxml2-dev libzip-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	10-cmake_libzip_zipconf_path.patch"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	cmake \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_PREFIX=/usr \
		. || return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE || return 1
}

sha512sums="b4518249835ed7cc672392bf2f8b1c62bc218e41c53663bb26ab34c9e43a99b6b7ae794babdb4bd775e467bb17918703a66ee57c8cf94cb7afc4ba2a7f74816a  ebook-tools-0.2.2.tar.gz
5fadd9346232192ae618993c5f48ab84fac84d32dce3be55e4485d756f5a364569298488960bd21c0783d5e160a186f6f335d92194c5f63fc619218335f117ed  10-cmake_libzip_zipconf_path.patch"
